package com.ss.baseinfo.dao.impl;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

import com.ss.baseinfo.dao.ProfessionalDao;
import com.ss.baseinfo.pojo.CollegeInfo;
import com.ss.baseinfo.pojo.ProfessionalInfo;
/**
 * 专业管理
 * @author Administrator
 *
 */
@Repository("professionalDao")
public class ProfessionalDaoImpl extends SqlMapClientDaoSupport implements ProfessionalDao {

	@Override
	public void add(ProfessionalInfo info) throws Exception {
		// TODO Auto-generated method stub
		this.getSqlMapClientTemplate().insert("professional.add",info);
	}

	@Override
	public int update(ProfessionalInfo info) throws Exception {
		// TODO Auto-generated method stub
		return this.getSqlMapClientTemplate().update("professional.update",info);
	}

	@Override
	public List<ProfessionalInfo> query(ProfessionalInfo info) throws Exception {
		// TODO Auto-generated method stub
		return this.getSqlMapClientTemplate().queryForList("professional.query",info);
	}

	@Override
	public ProfessionalInfo getOneById(String id) throws Exception {
		// TODO Auto-generated method stub
		return (ProfessionalInfo)this.getSqlMapClientTemplate().queryForObject("professional.getOneById",id);
	}

}
